package com.gwz.filter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import com.gwz.context.ProContent;


/**
 * 登录校验拦截器
 * @author panguixiang
 *
 */
public class AdminLoginFilter extends HandlerInterceptorAdapter {

    public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
                             Object handler) throws Exception {
    	
    	Object obj = request.getSession(true).getAttribute(ProContent.LOGIN_SESSION);
    	if(obj==null){
    		return false;
    	} else {
    		return true;
    	}
    }

}